const path = require("path");
const modules = {};

const files = require.context("./component/", false, /\.vue$/);

files.keys().forEach(key => {
    const name = path.basename(key, ".vue");
    const aa = key.match(/^\.\/(\w+)\.vue$/) // 也可以用正则替换以上方法
    console.log("aa=", aa[1]);

    modules[name] = files(key).default || files(key);
});


export { modules }
